/*
 * =====================================================================================
 *
 *       Filename:  user.h
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  03/16/19 16:27:32
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  jianxi sun (jianxi), ycsunjane@gmail.com
 *   Organization:  
 *
 * =====================================================================================
 */
#ifndef __USER_H__
#define __USER_H__

#include <pthread.h>
#include "socks5.h"
#include "uthash/include/uthash.h"
#include "list.h"

extern struct list_head urluser_head;
extern pthread_rwlock_t urluser_lock;

#define URL_MAXLEN	(50)
typedef struct urluser {
	int id;
	char url[URL_MAXLEN];
	struct list_head node;
} urluser_t;

void url_show(buffer2_t *buf);
int url_add(char *url);
int url_del(char *idstr);
#endif /* __USER_H__ */
